<!-- directive:title 代码自动化生产 产品 -->
<!-- directive:breadcrumb 自动化 -->
<div class="panel-body">
    <form class="yxf14 bigpadding" name="From">
        <b class="yxf14-title"> <i></i> 开卡表单 </b>
        <div class="yxflegend">
            <label>发送方师傅</label>
            <div class="yxf14-box">
                <label class="yxf14-label"> 用户名 </label>
                <div class="yxf14-control">
                    <input type="text" placeholder="请输入用户名" style="width:200px;"
                        ng-model="frm.username" name="username"
                        ng-pattern="/^[0-9a-zA-Z\u4e00-\u9fa5]+$/" ng-maxlength="50" maxlength="51">
                    <b class="note" ng-hide="(From.username.$dirty || From.submitted ) && From.username.$invalid">50位 不可使用特殊符号</b>
                    <b ng-show="(From.username.$dirty || From.submitted ) && From.username.$invalid"> 不可使用特殊符号 </b>
                </div>
            </div>
            <div class="yxf14-box">
                <label class="yxf14-label"> 账号 </label>
                <div class="yxf14-control">
                    <input type="text" placeholder="请输入账号" style="width:200px;"
                        ng-model="frm.account" name="account"
                        ng-pattern="/^[0-9a-zA-Z_-]+$/" ng-maxlength="20" maxlength="21">
                    <b class="note" ng-hide="(From.account.$dirty || From.submitted ) && From.account.$invalid">20位 不可使用中文以及特殊符号</b>
                    <b ng-show="(From.account.$dirty || From.submitted ) && From.account.$invalid"> 不可使用中文以及特殊符号 </b>
                </div>
            </div>
            <div class="yxf14-box">
                <label class="yxf14-label"> 中奖概率 </label>
                <div class="yxf14-control">
                    <input type="text" placeholder="请输入中奖概率" style="width:200px;"
                        ng-model="frm.rote" name="rote"
                        ui-validate="{error1: 'Rule.isNumFixed012($value)', error2: '$value>=0&&$value<=100'}" ng-maxlength="10" maxlength="11">
                    <b class="note" ng-hide="(From.rote.$dirty || From.submitted ) && From.rote.$invalid">10位 整数0-100或保留12位小数</b>
                    <b ng-show="(From.rote.$dirty || From.submitted ) && From.rote.$invalid"> 整数0-100或保留12位小数 </b>
                </div>
                <div class="yxf14-control">
                    <b class="note">我不知道为啥还要整一个这个</b>
                </div>
            </div>
        </div>
        <div class="yxf14-box">
            <label class="yxf14-label must"> 中奖日期 </label>
            <div class="yxf14-control">
                <input type="text" placeholder="请选择日期" style="width:200px;"
                    ng-model="frm.lotteryDate" name="lotteryDate"
                    datetime-picker config="{format: 'yyyy-mm-dd', minView:'month'}"
                    ng-required="true" >
                <b ng-show="(From.lotteryDate.$dirty || From.submitted ) && From.lotteryDate.$invalid"> 必填项 </b>
            </div>
        </div>
        <div class="yxf14-box">
            <label class="yxf14-label must">枚举项</label>
            <div class="yxf14-control">
                <input type="text" placeholder="请输入内容" style="width:200px;"
                    ng-model="frm.f09" name="f09"
                    maxlength="5"
                    >
                <button type="button" class="btn btn-danger" ng-disabled="!frm.f09" ng-click="frm2.f10add()">添加</button>
                <b class="note">请配置至少一个选项</b>
            </div>
            <div class="yxf14-control">
                <input type="text" style="display:none;"
                    ng-model="frm.f10" name="f10"
                    required convert-to-string
                    >
                <b ng-show="(From.f10.$dirty || From.submitted ) && From.f10.$invalid"> 必选一项 </b>
                <ul class="popupMultiBox">
                   <li ng-repeat="row in frm.f10 track by $index">
                       <span>{{ row }}</span>
                       <i class="glyphicon glyphicon-remove" ng-click="frm2.f10delete($index)" ></i>
                   </li>
                </ul>
            </div>
        </div>

        <div class="yxf14-box">
            <label class="yxf14-label must"> 花费金钱 </label>
            <div class="yxf14-control">
                <input type="text" placeholder="请输入花费金钱" style="width:200px;"
                    ng-model="frm.money" name="money"
                    required ui-validate="{error1: 'Rule.isNumFixed012($value)', error2: '$value>=0&&$value<=100'}" ng-maxlength="10" maxlength="11">
                <b class="note" ng-hide="(From.money.$dirty || From.submitted ) && From.money.$invalid">10位 整数0-100或保留12位小数</b>
                <b ng-show="(From.money.$dirty || From.submitted ) && From.money.$invalid"> {{From.money.$error.required?"必填项":"整数0-100或保留12位小数"}} </b>
            </div>
        </div>
        <div class="yxf14-box">
            <label class="yxf14-label must"> 彩票单价 </label>
            <div class="yxf14-control">
                <input type="text" placeholder="请输入彩票单价" style="width:200px;"
                    ng-model="frm.price" name="price"
                    required ui-validate="{error1: 'Rule.isNum($value)', error2: '$value>=0&&$value<=100'}" ng-maxlength="10" maxlength="11">
                <b class="note" ng-hide="(From.price.$dirty || From.submitted ) && From.price.$invalid">10位 请输入数字0-100</b>
                <b ng-show="(From.price.$dirty || From.submitted ) && From.price.$invalid"> {{From.price.$error.required?"必填项":"请输入数字0-100"}} </b>
            </div>
        </div>
        <div class="yxflegend">
            <label>发送方师傅</label>
            <div class="yxf14-box">
                <label class="yxf14-label must"> 彩票类型 </label>
                <div class="yxf14-control">
                    <input type="text" placeholder="请输入彩票类型" style="width:200px;"
                        ng-model="frm.lotteryType" name="lotteryType"
                        select2 config="frm2.lotteryTypeList" select2-model="frm2.lotteryType"
                        required ng-change="testSelect2NgChange()"
                    />
                    <b ng-show="(From.lotteryType.$dirty || From.submitted ) && From.lotteryType.$invalid"> {{From.lotteryType.$error.required?"必填项":"undefined"}} </b>
                </div>
                <div class="yxf14-control">
                    <b class="note">测试并解决select2 绑定的变量和内容变量不同时更新bug</b>
                </div>
                <div class="yxf14-control">
                    <b class="note">{{ frm.lotteryType }} , {{ frm2.lotteryType }}</b>
                </div>
            </div>
            <div class="yxf14-box">
                <label class="yxf14-label must"> 彩票类型2 </label>
                <div class="yxf14-control">
                    <input type="text" placeholder="请输入彩票类型2" style="width:200px;"
                        ng-model="frm.lotteryType2" name="lotteryType2"
                        select2 config="frm2.lotteryType2List" select2-model="frm2.lotteryType2"
                        required
                    />
                    <b ng-show="(From.lotteryType2.$dirty || From.submitted ) && From.lotteryType2.$invalid"> {{From.lotteryType2.$error.required?"必填项":"undefined"}} </b>
                </div>
            </div>
            <div class="yxf14-box">
                <label class="yxf14-label "> 获奖感言 </label>
                <div class="yxf14-control">
                    <textarea rows="3" placeholder="请输入获奖感言" style="width:500px;"
                        ng-model="frm.note" name="note"
                        ng-maxlength="10" maxlength="11">
                    </textarea>
                    <b class="note"><i>{{ frm.note.length || 0 }} / 64</i></b>
                    <b ng-show="(From.note.$dirty || From.submitted ) && From.note.$invalid">  </b>
                </div>
            </div>
        </div>
        <div class="yxf14-box">
            <label class="yxf14-label must"> 他人代领 </label>
            <div class="yxf14-control">
                <span class="checkbox-inline i-switch" ng-click="frm2.isothergetChange()">
                    <input type="checkbox" ng-checked="frm.isotherget" disabled> <i></i>
                </span>
                <b class="note"> 开发者请注意点击开关应该有判断条件状态！</b>
                <b ng-show="(From.isotherget.$dirty || From.submitted ) && From.isotherget.$invalid"> {{From.isotherget.$error.required?"必填项":"undefined"}} </b>
            </div>
        </div>
        <div class="yxf14-box">
            <label class="yxf14-label must"> 自己领奖 </label>
            <div class="yxf14-control">
                <label class="checkbox-inline i-switch"">
                    <input type="checkbox" ng-model="frm.ismeget" ng-true-value="1" ng-false-value="0"> <i></i>
                </label>
                <b ng-show="(From.ismeget.$dirty || From.submitted ) && From.ismeget.$invalid"> {{From.ismeget.$error.required?"必填项":"undefined"}} </b>
            </div>
        </div>
        <div class="yxf14-box">
            <label class="yxf14-label must"> 领奖方式 </label>
            <div class="yxf14-control">
                <label class="checkbox-inline i-checks">
                    <input type="radio" ng-model="frm.gettype" convert-to-number value="0">
                    <i></i>步行
                </label>
                <label class="checkbox-inline i-checks">
                    <input type="radio" ng-model="frm.gettype" convert-to-number value="1">
                    <i></i>骑车
                </label>
                <label class="checkbox-inline i-checks">
                    <input type="radio" ng-model="frm.gettype" convert-to-number value="2">
                    <i></i>开车
                </label>
                <b ng-show="(From.gettype.$dirty || From.submitted ) && From.gettype.$invalid"> {{From.gettype.$error.required?"必填项":"undefined"}} </b>
            </div>
        </div>
        <div class="yxf14-box">
            <label class="yxf14-label must"> 捐献对象 </label>
            <div class="yxf14-control">
                <label class="checkbox-inline i-checks">
                    <input type="checkbox" checklist-model="frm.donatewho" checklist-value="'0'">
                    <i></i>红十字美美会
                </label>
                <label class="checkbox-inline i-checks">
                    <input type="checkbox" checklist-model="frm.donatewho" checklist-value="'1'">
                    <i></i>贪官户头
                </label>
                <label class="checkbox-inline i-checks">
                    <input type="checkbox" checklist-model="frm.donatewho" checklist-value="'2'">
                    <i></i>壹基金
                </label>
                <b ng-show="(From.donatewho.$dirty || From.submitted ) && From.donatewho.$invalid"> {{From.donatewho.$error.required?"必填项":"undefined"}} </b>
            </div>
            <div class="yxf14-control">
                <b class="note">不捐不让走</b>
            </div>
        </div>
        <!-- 提交 -->
        <div class="yxf14-box">
            <div class="yxf14-control">
                <button type="button" class="btn btn-danger" ng-submit-btn="submitFun()">提交表单</button>
                <button type="button" class="btn btn-grey" ng-click="cancelFun()">取消</button>
            </div>
        </div>
    </form>
</div>